
#include<stdio.h>
#include<string.h>

char* Mystrtok(char*src,char*delim)
{
    static char* nextstr = NULL;

    if(src == NULL)
        src=nextstr;
    if(src == NULL)
        return NULL;

    
    while(*src != '\0')
    {
        char temp[] = {*src,'\0'};
        if(strstr(delim,temp))
        {
            src++;
        }
        else
        break;
    }
    if(*src == '\0')
    {
        return NULL;
    }
    
    char* end = src;
    
    while(*end != '\0')
    {
        char temp[]={*end,'\0'};
        if(strstr(delim,temp))
        {
            break;
        }
        else
        end++;
    }

    if(*end == '\0')
      nextstr=NULL;
    else
    nextstr = end + 1;

    return src;


}